function swap (arr, i, j) {
  const temp = arr[i]
  arr[i] = arr[j]
  arr[j] = temp
}

function randomIndex (L, R) {
  const randomIndex = L + Math.floor(Math.random() * (R - L + 1))
  return randomIndex
}

export { swap, randomIndex }
